package pl.edu.agh.ssm.monitor.data;


/**
 * Describes media in session
 * @author Tomasz
 *
 */
public class SessionMedia {

	private SessionMediaType mediaType;
	private String mediaName;
	private int mediaFreq;
	private SessionMediaState mediaState;
	
	public SessionMedia() {
		
	}
	 
	
	public SessionMedia(SessionMediaType mediaType, String mediaName,
			int mediaFreq) {
		this.mediaType = mediaType;
		this.mediaName = mediaName;
		this.mediaFreq = mediaFreq;
	}



	public SessionMediaType getMediaType() {
		return mediaType;
	}
	public void setMediaType(SessionMediaType mediaType) {
		this.mediaType = mediaType;
	}
//	public String getDesc() {
//		return desc;
//	}
//	public void setDesc(String desc) {
//		this.desc = desc;
//	}
	public String getMediaName() {
		return mediaName;
	}
	public void setMediaName(String mediaName) {
		this.mediaName = mediaName;
	}
	public int getMediaFreq() {
		return mediaFreq;
	}
	public void setMediaFreq(int mediaFreq) {
		this.mediaFreq = mediaFreq;
	}
	
	public SessionMediaState getMediaState() {
		return mediaState;
	}


	public void setMediaState(SessionMediaState mediaState) {
		this.mediaState = mediaState;
	}


	@Override
	public boolean equals(Object obj) {
		if( obj == null) 
			return false;
		
		if (obj instanceof SessionMedia) {
			SessionMedia newObj = (SessionMedia) obj;
			if(newObj.mediaFreq != this.mediaFreq ||
					!newObj.mediaName.equalsIgnoreCase(this.mediaName) ||
					newObj.mediaType != this.mediaType)
				return false;
			
		}
		return true;
	}
	
}
